3.1.66 \(\int \frac {(a+b \log (c x^n))^2 \log (d (\frac {1}{d}+f x^m))}{x} \, dx\) [66]

Optimal. Leaf size=73 \[ -\frac {\left (a+b \log \left (c x^n\right )\right )^2 \text {Li}_2\left (-d f x^m\right )}{m}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_3\left (-d f x^m\right )}{m^2}-\frac {2 b^2 n^2 \text {Li}_4\left (-d f x^m\right )}{m^3} \]

[Out]

-(a+b*ln(c*x^n))^2*polylog(2,-d*f*x^m)/m+2*b*n*(a+b*ln(c*x^n))*polylog(3,-d*f*x^m)/m^2-2*b^2*n^2*polylog(4,-d*
f*x^m)/m^3

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {2421, 2430, 6724} \begin {gather*} \frac {2 b n \text {PolyLog}\left (3,-d f x^m\right ) \left (a+b \log \left (c x^n\right )\right )}{m^2}-\frac {\text {PolyLog}\left (2,-d f x^m\right ) \left (a+b \log \left (c x^n\right )\right )^2}{m}-\frac {2 b^2 n^2 \text {PolyLog}\left (4,-d f x^m\right )}{m^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^m)])/x,x]

[Out]

-(((a + b*Log[c*x^n])^2*PolyLog[2, -(d*f*x^m)])/m) + (2*b*n*(a + b*Log[c*x^n])*PolyLog[3, -(d*f*x^m)])/m^2 - (
2*b^2*n^2*PolyLog[4, -(d*f*x^m)])/m^3

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2430

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*PolyLog[k_, (e_.)*(x_)^(q_.)])/(x_), x_Symbol] :> Simp[PolyLo
g[k + 1, e*x^q]*((a + b*Log[c*x^n])^p/q), x] - Dist[b*n*(p/q), Int[PolyLog[k + 1, e*x^q]*((a + b*Log[c*x^n])^(
p - 1)/x), x], x] /; FreeQ[{a, b, c, e, k, n, q}, x] && GtQ[p, 0]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^m\right )\right )}{x} \, dx &=-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \text {Li}_2\left (-d f x^m\right )}{m}+\frac {(2 b n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-d f x^m\right )}{x} \, dx}{m}\\ &=-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \text {Li}_2\left (-d f x^m\right )}{m}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_3\left (-d f x^m\right )}{m^2}-\frac {\left (2 b^2 n^2\right ) \int \frac {\text {Li}_3\left (-d f x^m\right )}{x} \, dx}{m^2}\\ &=-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \text {Li}_2\left (-d f x^m\right )}{m}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_3\left (-d f x^m\right )}{m^2}-\frac {2 b^2 n^2 \text {Li}_4\left (-d f x^m\right )}{m^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(526\) vs. \(2(73)=146\).
time = 0.15, size = 526, normalized size = 7.21 \begin {gather*} -\frac {1}{3} a b m n \log ^3(x)+\frac {1}{4} b^2 m n^2 \log ^4(x)-\frac {1}{3} b^2 m n \log ^3(x) \log \left (c x^n\right )-a b n \log ^2(x) \log \left (1+\frac {x^{-m}}{d f}\right )+\frac {2}{3} b^2 n^2 \log ^3(x) \log \left (1+\frac {x^{-m}}{d f}\right )-b^2 n \log ^2(x) \log \left (c x^n\right ) \log \left (1+\frac {x^{-m}}{d f}\right )+a b n \log ^2(x) \log \left (1+d f x^m\right )-\frac {2}{3} b^2 n^2 \log ^3(x) \log \left (1+d f x^m\right )+\frac {a^2 \log \left (-d f x^m\right ) \log \left (1+d f x^m\right )}{m}-\frac {2 a b n \log (x) \log \left (-d f x^m\right ) \log \left (1+d f x^m\right )}{m}+\frac {b^2 n^2 \log ^2(x) \log \left (-d f x^m\right ) \log \left (1+d f x^m\right )}{m}+b^2 n \log ^2(x) \log \left (c x^n\right ) \log \left (1+d f x^m\right )+\frac {2 a b \log \left (-d f x^m\right ) \log \left (c x^n\right ) \log \left (1+d f x^m\right )}{m}-\frac {2 b^2 n \log (x) \log \left (-d f x^m\right ) \log \left (c x^n\right ) \log \left (1+d f x^m\right )}{m}+\frac {b^2 \log \left (-d f x^m\right ) \log ^2\left (c x^n\right ) \log \left (1+d f x^m\right )}{m}+\frac {b n \log (x) \left (-b n \log (x)+2 \left (a+b \log \left (c x^n\right )\right )\right ) \text {Li}_2\left (-\frac {x^{-m}}{d f}\right )}{m}+\frac {\left (a-b n \log (x)+b \log \left (c x^n\right )\right )^2 \text {Li}_2\left (1+d f x^m\right )}{m}+\frac {2 a b n \text {Li}_3\left (-\frac {x^{-m}}{d f}\right )}{m^2}+\frac {2 b^2 n \log \left (c x^n\right ) \text {Li}_3\left (-\frac {x^{-m}}{d f}\right )}{m^2}+\frac {2 b^2 n^2 \text {Li}_4\left (-\frac {x^{-m}}{d f}\right )}{m^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*x^n])^2*Log[d*(d^(-1) + f*x^m)])/x,x]

[Out]

-1/3*(a*b*m*n*Log[x]^3) + (b^2*m*n^2*Log[x]^4)/4 - (b^2*m*n*Log[x]^3*Log[c*x^n])/3 - a*b*n*Log[x]^2*Log[1 + 1/
(d*f*x^m)] + (2*b^2*n^2*Log[x]^3*Log[1 + 1/(d*f*x^m)])/3 - b^2*n*Log[x]^2*Log[c*x^n]*Log[1 + 1/(d*f*x^m)] + a*
b*n*Log[x]^2*Log[1 + d*f*x^m] - (2*b^2*n^2*Log[x]^3*Log[1 + d*f*x^m])/3 + (a^2*Log[-(d*f*x^m)]*Log[1 + d*f*x^m
])/m - (2*a*b*n*Log[x]*Log[-(d*f*x^m)]*Log[1 + d*f*x^m])/m + (b^2*n^2*Log[x]^2*Log[-(d*f*x^m)]*Log[1 + d*f*x^m
])/m + b^2*n*Log[x]^2*Log[c*x^n]*Log[1 + d*f*x^m] + (2*a*b*Log[-(d*f*x^m)]*Log[c*x^n]*Log[1 + d*f*x^m])/m - (2
*b^2*n*Log[x]*Log[-(d*f*x^m)]*Log[c*x^n]*Log[1 + d*f*x^m])/m + (b^2*Log[-(d*f*x^m)]*Log[c*x^n]^2*Log[1 + d*f*x
^m])/m + (b*n*Log[x]*(-(b*n*Log[x]) + 2*(a + b*Log[c*x^n]))*PolyLog[2, -(1/(d*f*x^m))])/m + ((a - b*n*Log[x] +
 b*Log[c*x^n])^2*PolyLog[2, 1 + d*f*x^m])/m + (2*a*b*n*PolyLog[3, -(1/(d*f*x^m))])/m^2 + (2*b^2*n*Log[c*x^n]*P
olyLog[3, -(1/(d*f*x^m))])/m^2 + (2*b^2*n^2*PolyLog[4, -(1/(d*f*x^m))])/m^3

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.19, size = 2578, normalized size = 35.32

method result size
risch \(\text {Expression too large to display}\) \(2578\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^m))/x,x,method=_RETURNVERBOSE)

[Out]

I/m*dilog(d*f*x^m+1)*n*ln(x)*b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-2*b^2*n^2*polylog(4,-d*f*x^m)/m^3-I*n/m*ln(x)*
polylog(2,-d*f*x^m)*b^2*Pi*csgn(I*c)*csgn(I*c*x^n)^2-I*ln(x)*ln(d*(1/d+f*x^m))*ln(x^n)*b^2*Pi*csgn(I*c*x^n)^3-
a^2/m*dilog(d*f*x^m+1)+2*b^2/m*dilog(d*f*x^m+1)*ln(x)*ln(x^n)*n-2*b^2*n/m*ln(x)*polylog(2,-d*f*x^m)*ln(x^n)-2*
b*n/m*ln(x)*polylog(2,-d*f*x^m)*a+2*b/m*dilog(d*f*x^m+1)*n*ln(x)*a-I/m*dilog(d*f*x^m+1)*Pi*ln(c)*b^2*csgn(I*c)
*csgn(I*c*x^n)^2-I/m*dilog(d*f*x^m+1)*Pi*a*b*csgn(I*c)*csgn(I*c*x^n)^2-I/m*dilog(d*f*x^m+1)*ln(x^n)*b^2*Pi*csg
n(I*c)*csgn(I*c*x^n)^2-2*n/m*ln(x)*polylog(2,-d*f*x^m)*b^2*ln(c)+2/m*dilog(d*f*x^m+1)*n*ln(x)*b^2*ln(c)-b^2*n*
ln(1/d+f*x^m)*ln(x)^2*ln(x^n)-1/m*dilog(d*f*x^m+1)*ln(c)^2*b^2-2/m*dilog(d*f*x^m+1)*ln(c)*a*b+2*b*n/m^2*polylo
g(3,-d*f*x^m)*a-2*b/m*dilog(d*f*x^m+1)*ln(x^n)*a-2*b*ln(x)*ln(d*f*x^m+1)*ln(x^n)*a+n*ln(x)^2*ln(d*f*x^m+1)*b^2
*ln(c)+2*n/m^2*polylog(3,-d*f*x^m)*b^2*ln(c)-2/m*dilog(d*f*x^m+1)*ln(x^n)*b^2*ln(c)-2*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n)^2*csgn(I*c*x^n)^2-1/2/m*dilog(d*f*x^m+1)
*Pi^2*b^2*csgn(I*c)*csgn(I*x^n)^2*csgn(I*c*x^n)^3-1/2/m*dilog(d*f*x^m+1)*Pi^2*b^2*csgn(I*c)^2*csgn(I*x^n)*csgn
(I*c*x^n)^3

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^m))/x,x, algorithm="maxima")

[Out]

1/3*(b^2*n^2*log(x)^3 + 3*b^2*log(x)*log(x^n)^2 - 3*(b^2*n*log(c) + a*b*n)*log(x)^2 - 3*(b^2*n*log(x)^2 - 2*(b
^2*log(c) + a*b)*log(x))*log(x^n) + 3*(b^2*log(c)^2 + 2*a*b*log(c) + a^2)*log(x))*log(d*f*x^m + 1) - integrate
(1/3*(3*b^2*d*f*m*x^m*log(x)*log(x^n)^2 - 3*(b^2*d*f*m*n*log(x)^2 - 2*(b^2*d*f*m*log(c) + a*b*d*f*m)*log(x))*x
^m*log(x^n) + (b^2*d*f*m*n^2*log(x)^3 - 3*(b^2*d*f*m*n*log(c) + a*b*d*f*m*n)*log(x)^2 + 3*(b^2*d*f*m*log(c)^2
+ 2*a*b*d*f*m*log(c) + a^2*d*f*m)*log(x))*x^m)/(d*f*x*x^m + x), x)

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 131, normalized size = 1.79 \begin {gather*} -\frac {2 \, b^{2} n^{2} {\rm polylog}\left (4, -d f x^{m}\right ) + {\left (b^{2} m^{2} n^{2} \log \left (x\right )^{2} + b^{2} m^{2} \log \left (c\right )^{2} + 2 \, a b m^{2} \log \left (c\right ) + a^{2} m^{2} + 2 \, {\left (b^{2} m^{2} n \log \left (c\right ) + a b m^{2} n\right )} \log \left (x\right )\right )} {\rm Li}_2\left (-d f x^{m}\right ) - 2 \, {\left (b^{2} m n^{2} \log \left (x\right ) + b^{2} m n \log \left (c\right ) + a b m n\right )} {\rm polylog}\left (3, -d f x^{m}\right )}{m^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^m))/x,x, algorithm="fricas")

[Out]

-(2*b^2*n^2*polylog(4, -d*f*x^m) + (b^2*m^2*n^2*log(x)^2 + b^2*m^2*log(c)^2 + 2*a*b*m^2*log(c) + a^2*m^2 + 2*(
b^2*m^2*n*log(c) + a*b*m^2*n)*log(x))*dilog(-d*f*x^m) - 2*(b^2*m*n^2*log(x) + b^2*m*n*log(c) + a*b*m*n)*polylo
g(3, -d*f*x^m))/m^3

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**m))/x,x)

[Out]

Exception raised: TypeError >> Invalid comparison of non-real zoo

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2*log(d*(1/d+f*x^m))/x,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2*log((f*x^m + 1/d)*d)/x, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\ln \left (d\,\left (f\,x^m+\frac {1}{d}\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(d*(f*x^m + 1/d))*(a + b*log(c*x^n))^2)/x,x)

[Out]

int((log(d*(f*x^m + 1/d))*(a + b*log(c*x^n))^2)/x, x)

________________________________________________________________________________________